package cn.yeyiu.netonlinevideo.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import cn.yeyiu.netonlinevideo.R;

/**
 * 包含多个 tab 的数据展示界面
 *
 * 根据接受的视频源执行解析
 * 获取源分类
 * 获取分类视频list
 * 传递封装list至fragment进行渲染显示
 */

public class MultiTabDataListActivity extends AppCompatActivity {

    private ImageView backBtn;
    private TextView backTv;

    // page相关
    private ImageView preIv;
    private ImageView nextIv;
    private TextView curTv;
    private TextView maxTv;
    private LinearLayout typeBarLL;
    private LinearLayout typeViewLL;
    private View maskType;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_multi_tab_video_list);

        viewInit();
        eventInit();
        uiInit();
    }

    void viewInit() {
        backBtn = findViewById(R.id.back_btn);
        backTv = findViewById(R.id.back_tv);

        preIv = findViewById(R.id.pre_page_btn);
        nextIv = findViewById(R.id.next_page_btn);
        curTv = findViewById(R.id.cur_page_tv);
        maxTv = findViewById(R.id.sum_page_tv);

        typeBarLL = findViewById(R.id.type_bar_ll);
        typeViewLL = findViewById(R.id.type_view_ll);
        maskType = findViewById(R.id.mask_type);
    }



    void uiInit() {

    }

    void eventInit() {
        this.backBtn.setOnClickListener(v -> {
            finish();
        });

        typeBarLL.setOnClickListener(v->{
            if (typeViewLL.getVisibility()==View.VISIBLE){
                typeViewLL.setVisibility(View.INVISIBLE);
            }else{
                typeViewLL.setVisibility(View.VISIBLE);
            }
        });

    }
}